/*
 * @Date: 2021-12-07 16:49:47
 * @LastEditors: 春贰
 * @Desc: 
 * @LastEditTime: 2022-03-16 15:42:11
 * @FilePath: \web\src\api\module\role.js
 */
import http from '../http'

const Api = {
    list: '/role/list', 
    add: '/role/add',
    edit: '/role/edit', 
    permissions: '/role/permissions', 
    setPermissions: '/role/setpermissions', 
    remove: '/role/remove', 
}

export const list = data => {   
    return http.request({
        url: Api.list,
        data: data,
        method: 'POST'
    })
}
 
 
export const add = data => {   
    return http.request({
        url: Api.add,
        data: data,
        method: 'POST'
    })
}

export const edit = data => {     
    return http.request({
        url: Api.edit,
        data: data,
        method: 'POST'
    })
}

export const remove = data => {
    return http.request({
        url: Api.remove,
        data: data,
        method: 'POST'
    })
}

export const batchRemove = data => {
    return http.request({
        url: Api.batchRemove,
        data: data,
        method: 'POST'
    })
}
 
 
export const permissions = data => { 
    return http.request({
        url: Api.permissions,
        data: data,
        method: 'POST'
    })
}

export const setPermissions = data => { 
    return http.request({
        url: Api.setPermissions,
        data: data,
        method: 'POST'
    })
}

 
